#ifndef PROXY_PATTERN_H
#define PROXY_PATTERN_H

#include <string>

using namespace std;

class Image
{
public:
    virtual ~Image() {}

    virtual void display() = 0;
};

class RealImage : public Image
{
public:
    RealImage(string fileName);
    ~RealImage() {}

    void display() override;
    void loadFromDisk(string fileName);

private:
    string fileName;
};

class ProxyImage : public Image
{
public:
    ProxyImage(string fileName);
    ~ProxyImage() {}

    void display() override;

private:
    string fileName;
    RealImage* realImage;
};

#endif // PROXY_PATTERN_H
